home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / migrate / RCS / migrate.man,v < prev   
Encoding:
Text File  |  1991-04-03  |  11.1 KB  |  404 lines

  1. head     1.8;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    ; strict;
  6. comment  @@;
  7.  
  8.  
  9. 1.8
  10. date     91.04.03.12.20.01;  author kupfer;  state Exp;
  11. branches ;
  12. next     1.7;
  13.  
  14. 1.7
  15. date     90.09.24.14.38.29;  author douglis;  state Exp;
  16. branches ;
  17. next     1.6;
  18.  
  19. 1.6
  20. date     90.02.20.18.27.55;  author douglis;  state Exp;
  21. branches ;
  22. next     1.5;
  23.  
  24. 1.5
  25. date     89.06.15.22.55.52;  author douglis;  state Exp;
  26. branches ;
  27. next     1.4;
  28.  
  29. 1.4
  30. date     89.05.04.17.01.10;  author douglis;  state Exp;
  31. branches ;
  32. next     1.3;
  33.  
  34. 1.3
  35. date     88.12.30.09.46.52;  author ouster;  state Exp;
  36. branches ;
  37. next     1.2;
  38.  
  39. 1.2
  40. date     88.12.22.09.56.27;  author ouster;  state Exp;
  41. branches ;
  42. next     1.1;
  43.  
  44. 1.1
  45. date     88.11.21.13.29.02;  author douglis;  state Exp;
  46. branches ;
  47. next     ;
  48.  
  49.  
  50. desc
  51. @manual page for migrate (formerly mig) command.
  52. @
  53.  
  54.  
  55.  
  56. 1.8
  57. log
  58. @Change "mig" to "migrate".
  59. @
  60. text
  61. @' $Header: /sprite/src/cmds/migrate/RCS/migrate.man,v 1.7 90/09/24 14:38:29 douglis Exp Locker: kupfer $ SPRITE (Berkeley)
  62. .so \*(]ltmac.sprite
  63. .HS MIGRATE cmds
  64. .BS
  65. .SH NAME
  66. migrate \- Migrate a command to another machine
  67. .SH SYNOPSIS
  68. \fBmigrate\fR [\fB\-BbvlD\fR] [[\fB\-h \fIhost\fR] | [\fB\-H \fIhostID\fR]] [\fB\-p \fIprocessID\fR] [(\fB\-E \fIcmd\fR arg0 | \fIcmd\fR) \fIargs ...\fR]
  69. .BE
  70. .SH INTRODUCTION
  71. This command is used to execute commands remotely using the Sprite process
  72. migration facility.  It may be used to execute commands on a
  73. particular machine or to select from idle machines; and it may execute
  74. a command specified by the arguments to the \fBmigrate\fR program, or an
  75. interactive shell. 
  76. .SH "SELECTING A HOST"
  77. .IP "\fB\-B\fR"
  78. The \fB\-B\fR specifies that the host should be selected at
  79. ``background'' priority, rather than at the priority used for other
  80. tasks such as compilations.
  81. .IP "\fB\-h\fR"
  82. .IP "\fB\-H\fR"
  83. By default, a host is selected from among the idle hosts
  84. available on the local network.  This host is then marked as being in
  85. use for the duration of the command being executed; the host will not
  86. be chosen for remote execution of other processes in the meantime.  If
  87. a host is specified with the \fB\-h\fR or \fB\-H\fR options, then the
  88. ``in-use'' flag 
  89. is bypassed; this is useful when invoking \fBmigrate\fR as a ``remote
  90. login'' facility to execute commands directly on another host.   The
  91. \fB\-h\fR flag specifies a host by name, and the \fB\-H\fR flag
  92. specifies it by spriteID (thereby bypassing the host database lookup
  93. to convert from name to internal numeric identifier).
  94. .IP "\fB\-l\fR"
  95. If no host is specified and no idle host is available, the
  96. command is not executed unless the \fB\-l\fR option is specified, in
  97. which case the command is executed locally.   The ``\fB\-l\fR'' option similiarly
  98. affects the disposition of the command if migrating to the other host fails.
  99. .SH "EXECUTING A COMMAND"
  100. .PP
  101. To execute a single command remotely, the command may be specified by
  102. placing the command and its arguments after any options to \fBmigrate\fR.
  103. If no command is specified, an interactive shell is created.  If the
  104. \fBSHELL\fR environment variable is present, that shell is invoked,
  105. otherwise \fBcsh\fP is invoked.  In any case, the exit status from the
  106. subprocess is returned by \fBmigrate\fR.
  107. .IP "\fB\-E \fI command\fR"
  108. In some circumstances, programs may be invoked with \fBargv[0]\fR
  109. different from the name of the command.  In this case, 
  110. the \fB-E\fR option may be used to specify the name of a file to
  111. execute, and the first argument after the option list specifies the
  112. value of \fBargv[0]\fR.   Otherwise, \fBargv[0]\fR is set to the name
  113. of
  114. the command that is invoked.  
  115. .SH "MIGRATING A CURRENT PROCESS"
  116. .IP "\fB\-p\fR"
  117. To migrate a process that is already executing, invoke \fBmigrate\fR
  118. with the \fB\-p\fR option, giving the process ID of the process to
  119. migrate (in hex notation).  Each process must be migrated
  120. individually, in separate runs of \fBmigrate\fR.
  121. .SH "OTHER OPTIONS"
  122. .IP "\fB\-b\fR"
  123. The \fB\-b\fR option may be used to enter ``background mode'', in
  124. which \fBmigrate\fP executes a command and returns immediately, printing
  125. the process identifier of the migrated child.  Thus,
  126. .ce 1
  127. \fBmigrate xyzzy&\fP
  128. is different from
  129. .ce 1
  130. \fBmigrate -b xyzzy\fP.
  131. The process identifier for the former case is printed by the
  132. shell, and it corresponds to the \fBmigrate\fP process; while the process
  133. identifier in the latter case corresponds to the migrated child
  134. itself.  In the former case, normal \fBcsh\fP job control may be used
  135. to foreground and background the migrated child, but in the latter
  136. case, the process is not controlled by \fBcsh\fP.  
  137. .IP "\fB\-v\fR"
  138. The \fB\-v\fR option may be used to enter ``verbose mode'', in which
  139. case the host selected for migration is printed, or a message that no
  140. host could be selected is printed if the command is executed locally
  141. due to the \fB\-l\fR option.
  142. .IP "\fB\-D\fR"
  143. The \fB\-D\fR option enables ``debug mode'', which causes various
  144. debugging statements to be printed as the program executes.
  145. .SH "SEE ALSO"
  146. migrate, db, xload, pmake, loadavg, csh, ps
  147. .SH FILES
  148. \fB/sprite/admin/data/migInfo\fR - the global migration database file.
  149. .SH KEYWORDS
  150. process migration, load average, uptime, idle time, database, remote execution
  151. .SH BUGS
  152. If a process that is executing remotely is evicted when that
  153. machine is no longer available, the process will continue to execute
  154. locally.  This is nearly completely transparent to the user (\fBps
  155. -m\fR will no longer show the process as migrated).  Even if the host
  156. were not selected as an ``idle host'', the migrated process can be
  157. evicted if the other host goes from being available to being unavailable.
  158. .PP
  159. If another host is selected at random to migrate a process that is already 
  160. running, when that process exits the remote host, the remote host will remain
  161. flagged as ``in use'' for a short period of time.  This is because the
  162. \fBmigrate\fR
  163. process cannot conveniently wait for a process that isn't its child.
  164. @
  165.  
  166.  
  167. 1.7
  168. log
  169. @allow user to specify background priority
  170. @
  171. text
  172. @d1 1
  173. a1 1
  174. ' $Header: /sprite/src/cmds/mig/RCS/mig.man,v 1.6 90/02/20 18:27:55 douglis Exp Locker: douglis $ SPRITE (Berkeley)
  175. d3 1
  176. a3 1
  177. .HS MIG cmds
  178. d6 1
  179. a6 1
  180. mig \- Migrate a command to another machine
  181. d8 1
  182. a8 1
  183. \fBmig\fR [\fB\-BbvlD\fR] [[\fB\-h \fIhost\fR] | [\fB\-H \fIhostID\fR]] [\fB\-p \fIprocessID\fR] [(\fB\-E \fIcmd\fR arg0 | \fIcmd\fR) \fIargs ...\fR]
  184. d14 1
  185. a14 1
  186. a command specified by the arguments to the \fBmig\fR program, or an
  187. d29 1
  188. a29 1
  189. is bypassed; this is useful when invoking \fBmig\fR as a ``remote
  190. d42 1
  191. a42 1
  192. placing the command and its arguments after any options to \fBmig\fR.
  193. d46 1
  194. a46 1
  195. subprocess is returned by \fBmig\fR.
  196. d57 4
  197. a60 3
  198. To migrate a process that is already executing, invoke \fBmig\fR with the \fB\-p\fR 
  199. option, giving the process ID of the process to migrate (in hex notation).  
  200. Each process must be migrated individually, in separate runs of \fBmig\fR.
  201. d64 1
  202. a64 1
  203. which \fBmig\fP executes a command and returns immediately, printing
  204. d67 1
  205. a67 1
  206. \fBmig xyzzy&\fP
  207. d70 1
  208. a70 1
  209. \fBmig -b xyzzy\fP.
  210. d72 1
  211. a72 1
  212. shell, and it corresponds to the \fBmig\fP process; while the process
  213. d86 1
  214. a86 1
  215. mig, db, xload, pmake, loadavg, csh, ps
  216. d101 2
  217. a102 1
  218. flagged as ``in use'' for a short period of time.  This is because the mig
  219. @
  220.  
  221.  
  222. 1.6
  223. log
  224. @added -b option
  225. @
  226. text
  227. @d1 1
  228. a1 1
  229. ' $Header: /sprite/src/cmds/mig.new/RCS/mig.man,v 1.5 89/06/15 22:55:52 douglis Exp Locker: douglis $ SPRITE (Berkeley)
  230. d8 1
  231. a8 1
  232. \fBmig\fR [\fB\-bvlD\fR] [[\fB\-h \fIhost\fR] | [\fB\-H \fIhostID\fR]] [\fB\-p \fIprocessID\fR] [(\fB\-E \fIcmd\fR arg0 | \fIcmd\fR) \fIargs ...\fR]
  233. d17 4
  234. @
  235.  
  236.  
  237. 1.5
  238. log
  239. @allow hostID instead of hostName, for efficiency
  240. @
  241. text
  242. @d1 1
  243. a1 1
  244. ' $Header: /a/newcmds/mig/RCS/mig.man,v 1.4 89/05/04 17:01:10 douglis Exp Locker: douglis $ SPRITE (Berkeley)
  245. d8 1
  246. a8 1
  247. \fBmig\fR [\fB\-vlD\fR] [[\fB\-h \fIhost\fR] | [\fB\-H \fIhostID\fR]] [\fB\-p \fIprocessID\fR] [(\fB\-E \fIcmd\fR arg0 | \fIcmd\fR) \fIargs ...\fR]
  248. d57 15
  249. @
  250.  
  251.  
  252. 1.4
  253. log
  254. @added capability to separate exec name and argv[0] via -E option.
  255. useful for pmake.
  256. @
  257. text
  258. @d1 1
  259. a1 1
  260. ' $Header: /a/newcmds/mig/RCS/mig.man,v 1.3 88/12/30 09:46:52 ouster Exp Locker: douglis $ SPRITE (Berkeley)
  261. d8 1
  262. a8 2
  263. \fBmig\fR [\fB\-vlD\fR] [\fB\-h \fIhost\fR] [\fB\-p \fIprocessID\fR]
  264. [(\fB\-E \fIcmd\fR arg0 | \fIcmd\fR) \fIargs ...\fR]
  265. d18 1
  266. d23 2
  267. a24 1
  268. a host is specified with the \fB\-h\fR option, then the ``in-use'' flag
  269. d26 4
  270. a29 1
  271. login'' facility to execute commands directly on another host. 
  272. @
  273.  
  274.  
  275. 1.3
  276. log
  277. @More format upgrades.
  278. @
  279. text
  280. @d1 1
  281. a1 1
  282. ' $Header: /a/newcmds/mig/RCS/mig.man,v 1.2 88/12/22 09:56:27 ouster Exp Locker: ouster $ SPRITE (Berkeley)
  283. d8 2
  284. a9 1
  285. \fBmig\fR [\fB\-vlD\fR] [\fB\-h \fIhost\fR] [\fB\-p \fIprocessID\fR] [\fIcmd ...\fR]
  286. d39 8
  287. @
  288.  
  289.  
  290. 1.2
  291. log
  292. @*** empty log message ***
  293. @
  294. text
  295. @d1 1
  296. a1 1
  297. ' $Header: /a/newcmds/mig/RCS/mig.man,v 1.1 88/11/21 13:29:02 douglis Exp Locker: douglis $ SPRITE (Berkeley)
  298. d8 1
  299. a8 1
  300. \fBmig\fR [\fB-vlD\fR] [\fB-h \fIhost\fR] [\fB-p \fIprocessID\fR] [\fIcmd ...\fR]
  301. d17 1
  302. a17 1
  303. .IP "\fB-h\fR"
  304. d22 1
  305. a22 1
  306. a host is specified with the \fB-h\fR option, then the ``in-use'' flag
  307. d25 1
  308. a25 1
  309. .IP "\fB-l\fR"
  310. d27 2
  311. a28 2
  312. command is not executed unless the \fB-l\fR option is specified, in
  313. which case the command is executed locally.   The ``\fB-l\fR'' option similiarly
  314. d35 1
  315. a35 1
  316. SHELL environment variable is present, that shell is invoked,
  317. d39 2
  318. a40 2
  319. .IP "\fB-p\fR"
  320. To migrate a process that is already executing, invoke mig with the \fB-p\fR 
  321. d42 1
  322. a42 1
  323. Each process must be migrated individually, in separate runs of mig.
  324. d44 2
  325. a45 2
  326. .IP "\fB-v\fR"
  327. The \fB-v\fR option may be used to enter ``verbose mode'', in which
  328. d48 3
  329. a50 3
  330. due to the \fB-l\fR option.
  331. .IP "\fB-D\fR"
  332. The \fB-D\fR option enables ``debug mode'', which causes various
  333. @
  334.  
  335.  
  336. 1.1
  337. log
  338. @Initial revision
  339. @
  340. text
  341. @d1 3
  342. a3 2
  343. ' $Header: /sprite/doc/ref/cmds/RCS/loadavg,v 1.2 88/11/16 10:28:41 douglis Exp $ SPRITE (Berkeley)
  344. .TH mig prog
  345. d5 1
  346. a5 1
  347. .NA
  348. d7 2
  349. a8 2
  350. .SY
  351. \fBmig\fR \fI[-vlD]\fR \fI[-h host]\fR \fI[-x cmd ...]\fR
  352. d14 1
  353. a14 1
  354. a command specified by the arguments to the \fImig\fR program, or an
  355. d17 1
  356. a17 1
  357. .IP "-h"
  358. d22 2
  359. a23 2
  360. a host is specified with the \fI-h\fR option, then the ``in-use'' flag
  361. is bypassed; this is useful when invoking \fImig\fR as a ``remote
  362. d25 1
  363. a25 1
  364. .IP "-l"
  365. d27 2
  366. a28 2
  367. command is not executed unless the \fI-l\fR option is specified, in
  368. which case the command is executed locally.   The "-l" option similiarly
  369. d31 12
  370. a42 9
  371. .IP "-x"
  372. By default, 
  373. an interactive shell is created.  If the SHELL environment variable is
  374. present, that shell is invoked, otherwise \fIcsh\fP is invoked.  
  375. Alternatively, a  command may be specified using the \fI-x\fR option.
  376. This option must be the last option to \fImig\fP specified, because
  377. all subsequent arguments are considered to be a command to invoke.  In
  378. either case, the exit status from the command is returned by
  379. \fImig\fR.
  380. d44 2
  381. a45 2
  382. .IP "-v"
  383. The \fI-v\fR option may be used to enter ``verbose mode'', in which
  384. d48 3
  385. a50 3
  386. due to the \fI-l\fR option.
  387. .IP "-D"
  388. The \fI-D\fR option enables ``debug mode'', which causes various
  389. d53 1
  390. a53 1
  391. Mig, Db, xload, pmake, loadavg, csh, ps
  392. d55 1
  393. a55 2
  394. .IP /sprite/admin/data/migInfo
  395. The global migration database file.
  396. d59 1
  397. a59 1
  398. If a process that is executing remotely is \fBevicted\fR when that
  399. d61 1
  400. a61 1
  401. locally.  This is nearly completely transparent to the user (\fIps
  402. d65 5
  403. @
  404.